using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace DefaultNamespace.Skill
{
    public abstract class Skill : ScriptableObject
    {
        [Header("Basic Info")]
        public string skillName;
        public Sprite icon;
        public float cooldown;
        public float manaCost;
        [Header("Visuals")] 
        public GameObject castingVFX;
        public GameObject impactVFX;
        public AudioClip castSound;
        public float currentCooldown;
        public abstract void Activate(GameObject caster);
        public virtual void UpdateCooldown()
        {
            if (currentCooldown > 0)
            {
                currentCooldown -= Time.deltaTime;
            }
        }
        public bool IsReady()
        {
            return currentCooldown <= 0;
        }
        protected void StartCooldown()
        {
            currentCooldown = cooldown;
        }
    }
}